package com.family.gmall.common.constant;

/**
 * @Auther: family
 * @Date: 2023/7/15 10:20
 * @Description:
 */
public class RedisConst {
    public static final String SKUKEY_PREFIX = "sku:";
    public static final String SKUKEY_SUFFIX = ":info";
    //单位：秒
    public static final long SKUKEY_TIMEOUT = 24 * 60 * 60;
    // 商品如果在数据库中不存在那么会缓存一个空对象进去，但是这个对象是没有用的，所以这个对象的过期时间应该不能太长，
    // 如果太长会占用内存。
    // 定义变量，记录空对象的缓存过期时间

    public static final long SKUKEY_TEMPORARY_TIMEOUT = 10 * 60;

    //分布式锁过期时间
    public static final long SKULOCK_EXPIRE_PX2 = 10;
    public static final long SKULOCK_EXPIRE_PX1 = 100;

    public static final String INDEXPAGE_CATEGORY_TREE_KEY = "categorytree";


    public static final String SKUINFO = "sku:info:";

    public static final String BITMAP_SKUID = "bitmap:skuids";
    public static final String LOCK_SKUINFO = "lock:skuinfo:";
    public static final String BITMAP_SKUINFO = "bitmap:skuinfo";
    public static final Object USER_LOGIN_KEY_PREFIX = "user:login:";
    public static final long USERKEY_TIMEOUT = 3600;

    public static final String USER_KEY_PREFIX = "user:";
    public static final String USER_CART_KEY_SUFFIX = ":cart";
    public static final long USER_CART_EXPIRE = 30000;

}
